package com.bright.hxj.qchz.config;

import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.core.toolkit.ArrayUtils;
import com.baomidou.mybatisplus.generator.AutoGenerator;
import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
import com.baomidou.mybatisplus.generator.config.GlobalConfig;
import com.baomidou.mybatisplus.generator.config.PackageConfig;
import com.baomidou.mybatisplus.generator.config.StrategyConfig;
import com.baomidou.mybatisplus.generator.config.converts.SqliteTypeConvert;
import com.baomidou.mybatisplus.generator.config.po.TableField;
import com.baomidou.mybatisplus.generator.config.po.TableFill;
import com.baomidou.mybatisplus.generator.config.rules.DateType;
import com.baomidou.mybatisplus.generator.config.rules.IColumnType;
import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
import com.baomidou.mybatisplus.generator.engine.VelocityTemplateEngine;
import com.bright.ghj.common.mybatis.pojo.BaseEntity;

import java.util.ArrayList;

/**
 * @author xiaozq
 * @date 2023/6/1 11:23
 * mybatis-plus code generator.
 **/
public class MybatisPlusGenerator extends com.bright.ghj.common.mybatis.MybatisPlusGenerator {

    //生成文件所在项目路径
    private static String baseProjectPath = "E:\\ideaProject\\hxj\\bj-new\\qchz-receive\\src\\main\\java";

    //基本包名
    private static String basePackage = "com.bright.hxj.qchz";

    //作者(一般公司名简称)
    private static String authorName = "hxj";

    //要生成的表名，为空时生成所有表
    private static String[] tables = {"Duijie_Baowen_log"};

    //table前缀:生成代码的时候可以忽略前缀，生成实体类：
    /**例如: private static String prefix = "t_";
     则t_goods_info的表，生成实体类则是GoodsInfo而不是TGoodsInfo
     */
    private static String prefix = "";

    //数据库配置四要素
    private static String driverName = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
    private static String url = "jdbc:sqlserver://219.135.179.253:62224;DataBaseName=zcjy_szqc2022_mz;encrypt=false";
    private static String username = "sa";
    private static String password = "gzbright38259201@2w3e";
//    private static String url = "jdbc:sqlserver://localhost:1433;DataBaseName=zcjy_th_duijie_gzs_jieshou;encrypt=false";
//    private static String username = "sa";
//    private static String password = "gzbright38259201@";
//    private static String url = "jdbc:sqlserver://219.135.179.253:62224;DataBaseName=analysis_szqc_nb_new;encrypt=false";
//    private static String username = "sa";
//    private static String password = "gzbright38259201@2w3e";

    public static void main(String[] args) {
        start(baseProjectPath, authorName, url, driverName, username, password, basePackage, tables, prefix);
    }

}


